/**
 * Copyright 2025 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

.spectrum-Menu-back:focus-visible {
    box-shadow: var(--spectrum-menu-item-focus-indicator-shadow) var(--spectrum-menu-item-focus-indicator-border-width) 0 0 0 var(--spectrum-menu-item-focus-indicator-color-default);
    outline: var(--spectrum-menu-item-focus-indicator-width) var(--spectrum-menu-item-focus-indicator-outline-style) var(--spectrum-menu-item-focus-indicator-color-default);
    outline-offset: var(--spectrum-menu-item-focus-indicator-offset);
    border-radius: var(--spectrum-menu-item-corner-radius);
}

.header {
    color: var(--highcontrast-menu-item-color-default, var(--mod-menu-section-header-color, var(--spectrum-menu-section-header-color)));
    font-size: var(--mod-menu-section-header-font-size, var(--spectrum-menu-section-header-font-size));
    font-weight: var(--mod-menu-section-header-font-weight, var(--spectrum-menu-section-header-font-weight));
    line-height: var(--mod-menu-section-header-line-height, var(--spectrum-menu-section-header-line-height));
    min-inline-size: var(--mod-menu-section-header-min-width, var(--spectrum-menu-section-header-min-width));
    padding-block-start: var(--mod-menu-section-header-top-edge-to-text, var(--mod-menu-item-top-edge-to-text, var(--spectrum-menu-item-top-edge-to-text)));
    padding-block-end: var(--mod-menu-section-header-bottom-edge-to-text, var(--mod-menu-item-bottom-edge-to-text, var(--spectrum-menu-item-bottom-edge-to-text)));
    padding-inline: var(--mod-menu-item-label-inline-edge-to-content, var(--spectrum-menu-item-label-inline-edge-to-content));
    grid-area: sectionHeadingArea / 1 / sectionHeadingArea / -1;
    display: block;
}

.spectrum-Menu-back {
    padding-inline: var(--mod-menu-back-padding-inline-start, 0) var(--mod-menu-back-padding-inline-end, var(--spectrum-menu-item-label-inline-edge-to-content));
    padding-block: var(--mod-menu-back-padding-block-start, 0) var(--mod-menu-back-padding-block-end, 0);
    flex-flow: wrap;
    align-items: center;
    display: flex;
}

.spectrum-Menu-back .header {
    padding: 0;
}

.spectrum-Menu-backButton {
    cursor: pointer;
    background: none;
    border: 0;
    margin: 0;
    padding: 0;
    display: inline-flex;
}

.spectrum-Menu-backButton:focus-visible {
    outline: var(--spectrum-focus-indicator-thickness) solid var(--spectrum-focus-indicator-color);
    outline-offset: calc((var(--spectrum-focus-indicator-thickness) + 1px) * -1);
}

.spectrum-Menu-backHeading {
    color: var(--highcontrast-menu-item-color-default, var(--mod-menu-back-heading-color, var(--spectrum-menu-section-header-color)));
    font-size: var(--mod-menu-section-header-font-size, var(--spectrum-menu-section-header-font-size));
    font-weight: var(--mod-menu-section-header-font-weight, var(--spectrum-menu-section-header-font-weight));
    line-height: var(--mod-menu-section-header-line-height, var(--spectrum-menu-section-header-line-height));
    display: block;
}
